
/*
 * @Descripttion:
 * @version:
 * @Author: ws
 * @Date: 2022-01-22 15:07:23
 * @LastEditors: ws
 * @LastEditTime: 2022-01-22 15:08:36
 */
import request from '../utils/http'
/**
 * @alias 登录
 */
export function login(data: any) {
	return request.post('/api/login', data)
}

/**
 * @alias 登出
 */
export function logout() {
	return request.post('/api/logout', {})
}


/**
 * @alias 获取公钥
 */
export function publicKey() {
	return request.get('/api/publicKey', {})
}

/**
 * @alias 刷新token
 */
export function refreshToken() {
	return request.get('/api/refreshToken', {})
}

/**
 * @alias 验证码
 */
export function verifyCode(params:any) {
	return request.get('/api/smsVerifyCode', params)
}
/**
 * @alias 绑定微信手机号
 */
export function bindPhoneCode(phoneCode:any) {
	return request.get(`/api/bind/wechat/phone/${phoneCode}`, {})
}
/**
 * @alias 绑定
 */
export function bind(params:any) {
	return request.get('/api/bind', params)
}
/**
 * @alias 获取用户信息
 */
export function userInfo(data: any) {
	return request.get('/api/userInfo', data)
}
/**
 * @alias 获取岗位身份
 */
export function postCodeSelect(data: any) {
	return request.get('/api/postCodeSelect', data)
}
/**
 * @alias 修改用户密码
 */
export function updatePwd(data: any) {
	return request.post(`/api/updatePassword`, data)
}
/**
 * @alias 获取角色身份
 */
export function userRole(id: any) {
	return request.get(`/api/sys/user/role/${id}`, {})
}
/**
 * @alias 注册
 */
export function register(data: any) {
	return request.post(`/api/register`, data)
}
